<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%>
<head>
    <title><fmt:message key="category" /></title>
</head>
<body>
    <h1><fmt:message key="category" /></h1>
    <div class="buttons">
       <c:url var="createUrl" value="/domain/category/createForm">
			<c:param name="category.parentInode" value="${category.inode}" />
	   </c:url>
       <a href="${createUrl}"><span><fmt:message key="label.link.create" /><fmt:message key="category" /></span></a>
    </div>

    <table>
        <tbody>
			<tr>
                <th><fmt:message key="category_inode" /></th>
                <td>
                    <c:out value="${category.inode}"/>                
				</td>
            </tr>
			<tr>
                <th><fmt:message key="category_parentInode" /></th>
                <td>
					<c:url var="showParent" value="/domain/category/show">
						<c:param name="category.inode" value="${category.parentNode.inode}" />
					</c:url>
                    <a href="${showParent}"><c:out value="${category.parentNode.inode} - ${category.parentNode.title}"/></a>               
				</td>
            </tr>
            <tr>
                <th><fmt:message key="category_title" /></th>
                <td>
                    <c:out value="${category.title}"/>                
				</td>
            </tr>
            <tr>
                <th><fmt:message key="category_friendlyName" /></th>
                <td>
                    <c:out value="${category.friendlyName}"/>                
				</td>
            </tr>
            <tr>
                <th><fmt:message key="category_showOnMenu" /></th>
                <td>
                    <c:out value="${category.showOnMenu}"/>                </td>
            </tr>
            <tr>
                <th><fmt:message key="category_sortOrder" /></th>
                <td>
                    <c:out value="${category.sortOrder}"/>                </td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td colspan="2">
                    <div class="buttons">
                        <c:url var="updateUrl" value="/domain/category/updateForm">
                            <c:param name="category.inode" value="${category.inode}"/>
                        </c:url>
                        <a href="${updateUrl}"><span><fmt:message key="label.link.update"/></span></a>
                        <c:url var="confirmDeleteUrl" value="/domain/category/confirmDelete">
                            <c:param name="category.inode" value="${category.inode}"/>
                        </c:url>
                        <a id="confirmDeleteUrl" href="${confirmDeleteUrl}"><span><fmt:message key="label.link.delete"/></span></a>
                        <script type="text/javascript">
                            Spring.addDecoration(new Spring.AjaxEventDecoration({
                                elementId: "confirmDeleteUrl",
                                event: "onclick",
                                popup: "true",
                                params: { decorator: "none" }
                            }));
                        </script>
                    </div>
                </td>
            </tr>
        </tfoot>
    </table>
    <h2><fmt:message key="label.related.content"/></h2>
</body>
